<?php
final class system_user {
	

	private static $_instance = null;
	/**
	 * @return system_user
	 */
	public static function getInstance() {
		if(null === self::$_instance) {
			self::$_instance = new self();
		}
		return self::$_instance;
	}
	
	protected $_user = null;
	/**
	 * @return system_user_row
	 */
	public function getRow() {
		if(null === $this->_user && ($passport_id = system_passport::getInstance()->getStorage()->getId())) {
			$concept = new system_user_concept();
			$this->_user = $concept->fetch(array('system_user.passport_id = ?' => $passport_id));
		}
		return $this->_user;
	}
	
}